Ext.define('Holo.view.app.FormAppDesc', {
    extend: 'Ext.form.Panel',
    alias : 'widget.createsappdesc',
    height: 500,
    width: 550,
    border :false,
    disabled : false, 
    bodyPadding: 10,
    frameHeader: false,
    
    storeAvailableTrip : null,
    
    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'textfield',
                    name :'title',
                    fieldLabel: Label.get('LAB120'),
                    maxLength:60,
                    width: 350,
                    allowBlank: false,
	            blankText:Error.get('ERR005'),
                    maxLengthText:Error.get('ERR003'),
                    minLength:5,
                    minLengthText:Error.get('ERR002')
                },
                {
                    xtype: 'textareafield',
                    name :'description',
                    fieldLabel: Label.get('LAB121'),
                    maxLength:1000,
                    allowBlank: false,
                    width: 350,
                    height :70,
	            blankText:Error.get('ERR005'),
                    maxLengthText:Error.get('ERR003'),
                    minLength:20,
                    minLengthText:Error.get('ERR002')
                },
                {
                    xtype: 'itemselector',
                    name: 'apptriplink',
                    //id: 'itemselector-field',
                    anchor: '100%',
                    fieldLabel:  Label.get('LAB122'),
                    imagePath: '../ux/images/',
                    store: me.storeAvailableTrip,
                    displayField: 'name',
                    valueField: 'id',
                    allowBlank: true,
                    msgTarget: 'side'
                }
                
            ],
            buttons :[{
                        text: Label.get('LAB903'),
                        action:'updateappdesc',
                        formBind: true, //only enabled once the form is valid
                        disabled: true
                    }]
        });

        me.callParent(arguments);
    }
});